#include "Camera.h"

Camera::Camera()
{
};

Camera::~Camera()
{
};

Matrix *Camera::GetTransform()
{
    transformMatrix.Reset();
    
    transformMatrix.RotateX(-rotation.x);
    transformMatrix.RotateY(-rotation.y);
    transformMatrix.RotateZ(-rotation.z);
    
    transformMatrix.Translate(-position.x, -position.y, -position.z);
    
    return &transformMatrix;
};

void Camera::Translate(const Vector3 &translate)
{
    Matrix matrix;
    matrix.RotateX(-rotation.x);
    matrix.RotateY(-rotation.y);
    matrix.RotateZ(-rotation.z);
    
	position += matrix * translate;
};
